package com.movie.ticket.sale;

import com.movie.ticket.sale.form.OrderSeat;
import com.movie.ticket.sale.moviecommon.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@FeignClient(value = "movie-movie", contextId = "MovieDetailsInterface")
public interface MovieDetailsInterface {
    /**
     *展示电影封面
     */
    @GetMapping("movie/film/show/getMovieData")
    public Result getMovieData(int id);
    /**
     * 展示电影信息(包括简介)
     */
    @GetMapping("movie/film/show/getMovieInnformention")
    public Result getMovieInnformention(int id);
    /**
     * 展示电影评论
     * @param id
     * @param currPage
     * @param number
     * @return
     */
    @GetMapping("movie/film/show/getMovieCommon")
    public Result getMovieReview(@RequestParam(value = "id") int id, @RequestParam(value = "currPage",defaultValue = "1")int currPage, @RequestParam(value = "number",defaultValue = "5")int number);
    /**
     * 展示电影导演********************
     * @param id
     * @return
     */
    @GetMapping("movie/film/show/getMoviePerson")
    public Result getMoviePerson(int id);
    /**
     * 展示演员*****************************
     * @param id
     * @return
     */
    @GetMapping("movie/film/show/getMoviePersonAactor")
    public Result getMoviePersonAactor(int id);
    /**
     * 展示电影剧照**************************
     * @param id
     * @return
     */
    @GetMapping("movie/film/show/getMoviePhoto")
    public Result getMoviePhoto(int id);
    /**
     * 演员人员头像
     * @param id
     * @return
     */
    @GetMapping("movie/film/show/getCastPhotoAuctor")
    public Result getCastPhotoAuctor(int id);
    /**
     * 展示导演头像
     * @param id
     * @return
     */
    @GetMapping("movie/film/show/getCastPhotoDirector")
    public Result getCastPhotoDirector(int id);
    /**
     * 演职人员参演作品********************************************
     * @param id
     * @param type
     * @return
     */
    @GetMapping("movie/film/show/getCastInWork")
    public Result getCastInWork(@RequestParam(value = "id") int id,@RequestParam(value = "type")int type);
    /**
     * 选择影院，按照区域，时间，影厅，服务筛选，传入经纬度默认距离最近的在前面，可调整为通过价格排序
     * @param cinemaName
     * @param region
     * @param
     * @param
     * @param service
     * @param currPage
     * @param number
     * @return
     */
    @GetMapping("movie/film/show/chooseCinema")
    public Result chooseCinema(@RequestParam(value = "cinemaName")String cinemaName,@RequestParam(value = "region")String region,@RequestParam(value = "service")String service,@RequestParam(value = "currPage",defaultValue = "1")int currPage,@RequestParam(value = "number",defaultValue = "5")int number);
    /**
     * 影院详情包含影院照片，影院信息，地址信息（地图）
     * @param id
     * @return
     */
    @GetMapping("movie/show/getCinemaMessagePicture")
    public Result getCinemaMessagePicture(int id);
    /**
     * 展示当前影院上线的电影
     * @param id
     * @return
     */
    @GetMapping("movie/show/getCinemaMovie")
    public Result getCinemaMovie(@RequestParam(value = "id") int id);

    /**
     * 获取场次的可用座位信息
     * @param peridId
     * @return
     */
    @GetMapping("movie/show/getSetsByPerid")
    Result getSetsByPerid(@RequestParam(value = "peridId")int peridId);

    /**
     * 获取用户所选择的座位信息
     * @param orderSeat
     * @return
     */
    @PostMapping("movie/add/addSeat")
    public Result addSeat(@RequestBody OrderSeat orderSeat);

    /**
     * 发送验证码（验证）
     */

    @PostMapping("movie/add/checkMessage")
    public Result checkMessage(String verificationCode);
    /**
     * 调用支付接口
     * @return
     */
    @GetMapping("movie/add/payMoney")
    public void payMoney(HttpServletResponse rep,@RequestParam("userTel")String userTel);
    /**
     * 展示用户拥有的优惠券
     * @param tel
     * @param currpage
     * @param number
     * @return
     */
    @GetMapping("movie/getDiscountByUserTel")
    public Result getDiscountByUserTel(@RequestParam(value = "tel") String tel,@RequestParam(value = "currpage",defaultValue = "1")int currpage,@RequestParam(value = "number",defaultValue = "10")int number);
    /**
     * 通过输入的影片名模糊查询，再进行分页渲染
     * @param movieName
     * @param currpage
     * @param number
     * @return
     */
    @GetMapping("movie/show/getMovieByMovieName")
    public Result getMovieByMovieName(@RequestParam(value = "movieName") String movieName,@RequestParam(value = "currpage",defaultValue = "1")int currpage,@RequestParam(value = "number",defaultValue = "10")int number);
    /**
     * 通过输入的影人名模糊查询，再进行分页渲染
     * @param peopleName
     * @param currpage
     * @param number
     * @return
     */
    @GetMapping("movie/show/getMovieByPeopleName")
    public Result getMovieByPeopleName(@RequestParam(value = "peopleName") String peopleName,@RequestParam(value = "currpage",defaultValue = "1")int currpage,@RequestParam(value = "number",defaultValue = "5")int number);
    /**
     * 通过输入的影院名模糊查询，再进行分页渲染
     * @param cinemaName
     * @param currpage
     * @param number
     * @return
     */
    @GetMapping("movie/show/getMovieByCinemaName")
    public Result getMovieByCinemaName(@RequestParam(value = "cinemaName") String cinemaName,@RequestParam(value = "currpage",defaultValue = "1")int currpage,@RequestParam(value = "number",defaultValue = "5")int number);
    /**
     * 根据电影类型，国家，年代进行动态筛选,并分页展示
     * @param movieType
     * @param MovieTime
     * @param currpage
     * @param number
     * @return
     */
    @GetMapping("movie/show/getMovieByTypeTime")
    public Result getMovieByTypeTime(@RequestParam(value = "movieType") String movieType,@RequestParam(value = "MovieTime") String MovieTime,@RequestParam(value = "currpage",defaultValue = "1")int currpage,@RequestParam(value = "number",defaultValue = "5")int number);

}
